<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommentReplyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('comment_reply', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('comment_id')->comment('评论id');
            $table->text('reply_content')->default('')->comment('回复内容');
            $table->dateTime('reply_time')->comment('回复时间');
            $table->tinyInteger('reply_status')->default(1)->comment('回复状态 1 显示 0隐藏');
            $table->index('comment_id');
            $table->index('reply_status');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('comment_reply');
    }
}
